<template>
  <div class="card-common-inner wise-man-over-view">
    <div class="over-view-more">
      <van-swipe class="staff-swipe" >
        <van-swipe-item>
          <div class="more-item" @click="gotoPage('/publicline/board/morning')">
            <div class="img-wrap"><img src="~@/assets/imgs/wise/index/icon-fazhan.png" /></div>
            <div class="total-title">晨会</div>
          </div>
          <div class="more-item" @click="gotoPage('/publicline/board/evening')">
            <div class="img-wrap"><img src="~@/assets/imgs/wise/index/icon-qianfei.png" /></div>
            <div class="total-title">夕会</div>
          </div>
          <div class="more-item" @click="gotoPage('/publicline/town-info')">
            <div class="img-wrap"><img src="~@/assets/imgs/wise/index/icon-yujing.png" /></div>
            <div class="total-title">作战情报</div>
          </div>
          <!-- <div class="more-item" @click="gotoPage('/publicline/wise/salary')">
            <div class="img-wrap"><img src="~@/assets/imgs/wise/index/icon-xinchou.png" /></div>
            <div class="total-title">薪酬</div>
          </div> -->
          <div class="more-item" @click="gotoPage('/publicline/wise/integralTotal')">
            <div class="img-wrap"><img src="~@/assets/imgs/wise/index/icon-jifen.png" /></div>
            <div class="total-title">积分</div>
          </div>
          <!-- <div class="more-item" @click="gotoPage('/publicline/payroll')">
            <div class="img-wrap"><img src="~@/assets/imgs/wise/index/icon-gongzidan.png" /></div>
            <div class="total-title">工资单</div>
          </div> -->
          <div class="more-item" @click="openNewWindow('xq')">
            <div class="img-wrap"><img src="~@/assets/imgs/publicline/index/icon_xqst.png" style="width: 26px;"/></div>
            <div class="total-title">小区视图</div>
          </div>
          <!-- <div class="more-item" @click="gotoPage('/publicline/integral/evaluate')">
            <img src="~@/assets/imgs/publicline/index/icon_rank.png" style="width: 26px;" />
            <div class="total-title">积分评价</div>
          </div>
          <div class="more-item" @click="gotoPage('/publicline/team/list')">
            <img src="~@/assets/imgs/publicline/index/icon_team.png" style="width: 26px;" />
            <div class="total-title">团队建设</div>
          </div> -->
        </van-swipe-item>
      </van-swipe>
    </div>
  </div>
</template>

<script>
import { Toast } from 'vant'

export default {
  components: {  },
  data() {
    return {
      // 只有城市综合网格类型可看收入预测菜单
      isShowForecase:this.$marketType=='02'
    };
  },
  methods: {
    gotoPage( path ) {
      this.$open.call(this, path);
    },
    openNewWindow( type ) {
      this.$message.info("正在建设中")
      return;
      qm.auth.getAccessToken({
        onSuccess:function(res){
          let url = "";
          if ( type == 'zhmd' ) url = "https://sxyyxt.cn/istore/user/zwAppLogin?appToken=";
          if ( type == 'gdqd' ) {
            url = "https://sxyyxt.cn/gdqd/zwAppLogin?token=";
            qm.webNavigation.hideNavigationBar();
          }
          if( type == 'yjsp' ) {
            url = "https://sxyyxt.cn/gdqd/shop/portrait/login?token=";
            qm.webNavigation.hideNavigationBar();
          }
          if( type == 'zhsq' ) {
            url = "https://sxyyxt.cn/gdqd/enterprise/portrait/login?token=";
            qm.webNavigation.hideNavigationBar();
          }
          if ( type == 'zshj' ) {
            url = "http://123.138.11.5:9300/#/Login";
            qm.webNavigation.hideNavigationBar();
          }
          if ( type == 'bims' ) url = "https://sxyyxt.cn/bims/user/zwAppLogin?appToken=";
          if ( type == 'xq' ) {
            const params = JSON.stringify({ accessToken: res.accessToken });
            url = "https://sxyyxt.cn/wocsApp/pages/communityView/search.html?_data=" + encodeURI(params);
            qm.jump.openNewBrowser({ url } );
            return;
          }
          if ( type == '360' ) {
            const params = JSON.stringify({ accessToken: res.accessToken });
            url = "https://sxyyxt.cn/wocsApp/pages/MyManpower/360Viewindex.html?_data=" + encodeURI(params);
            qm.jump.openNewBrowser({ url } );
            return;
          }

          qm.jump.openNewBrowser({
            url: url + res.accessToken
          } );
        },
        onError:function(res){
          Toast.fail({
            message: "获取用户token失败！"
          })
        }
      });
    },
    gotoPage( path ) {
      this.$open.call(this, path);
    },
  }
}
</script>
<style lang="less" scoped>
@import '~@/assets/less/card.less';
.wise-man-over-view {
  .over-view-more .more-item {
    text-align: center;
    .total-title {
      font-size: 13px;
      color: #666;
      margin-top: 6px;
    }
  }
  .over-view-more .van-swipe-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    .more-item {
      width: 20%;
      height: 70px;
      display: flex;
      align-items: center;
      flex-direction: column;
      justify-content: center;
    }
    .img-wrap {
      height: 26px;
      display: flex;
      align-items: center;
    }
    img {
      width: 22px;
      vertical-align: bottom;
    }
  }
  /deep/ .staff-swipe {
    .van-swipe__indicators {
      bottom: 0;
    }
    .van-swipe__indicator {
      width: 4px;
      height: 4px;
      background-color: #999;
      opacity: .9;
      &:not(:last-child) {
        margin-right: 4px;
      }
    }
    .van-swipe__indicator--active {
      background-color: #3e83fd;
      opacity: 1;
      width: 10px;
      border-radius: 4px;
    }
  }
}
</style>
